<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Show_test {
    
   
    function show($str,$color,$flag){

        if($flag){
            echo "<font color=".$color.">".$str."</font>";
        }
        
    }


    function is_broker_visible() {

        $CI = & get_instance();
        $purview = $CI->login_lib->purview(); 
        $users_id = $CI->login_lib->users_id(); 
        
        $_str=explode(',', $purview);

        $flag=false;
        foreach($_str as $_flg => $value ){

            if(!empty($value))
            if( $value=='broker_is_visible' OR $purview=='#all' ){
                $flag=true;
            //       echo "broker_is_visible";
                
            }
        }
        
        return $flag;
        
    }

    function is_broker_visible_demand() {

        $CI = & get_instance();
        $purview = $CI->login_lib->purview(); 
        $users_id = $CI->login_lib->users_id(); 
        
        $_str=explode(',', $purview);

        $flag=false;
        foreach($_str as $_flg => $value ){

            if(!empty($value))
            if( $value=='demand_broker_is_visible' OR $purview=='#all' ){
                $flag=true;            
                
            }
        }
        
        return $flag;
        
    }

    function is_broker_visible_object() {

        $CI = & get_instance();
        $purview = $CI->login_lib->purview(); 
        $users_id = $CI->login_lib->users_id(); 
        
        $_str=explode(',', $purview);

        $flag=false;
        foreach($_str as $_flg => $value ){

            if(!empty($value))
            if( $value=='object_broker_is_visible' OR $purview=='#all' ){
                $flag=true;                            
            }
        }
        
        return $flag;
        
    }    

	
}
// END Login class
/* End of file Login.php */
